package com.hh.vietnameseproject.ui.login

import android.app.Activity
import java.util.ArrayList

object ActivityController {

    val activityList = ArrayList<Activity>()

    fun addList(activity: Activity) {
        activityList.add(activity)
    }

    fun removeList(activity: Activity) {
        activityList.remove(activity)
    }

    fun closeAll() {
        for (i in activityList) {
            if (!i.isFinishing) {
                i.finish()
            }
        }
    }
}